#! /bin/bash

w=`stty size | awk '{print $1}'`
h=`stty size | awk '{print $2}'`

input=$1
output=$2

#ffmpeg -hide_banner -loglevel error -y -i 1080p.jpg -vf "scale=238:60,format=rgb24" output.rgb

if ! command -v ffmpeg > /dev/null; then
    exit -1
fi

ffmpeg -hide_banner -loglevel error -y -i ${input} -vf "scale=${w}:${h},format=rgb24" ${output}
